﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyAnimalOOP
{
    class Program
    {
       /*
        * -Object
        * --Animal
        * ---Mammal
        * ---- Dog
        * ---- Cat
        * ---Fish
        * ---- Shark */

        static void Main(string[] args)
        {

            Mammal d = new Dog();
            d.HairColor = "Brown";
      
            Mammal c = new Cat();
            c.HairColor = "Yellow";

            List<Animal> animals = new List<Animal>();
            animals.Add(d);
            animals.Add(c);
            animals.Add(new Shark());

            /// Go through each of the animals
            foreach(var m in animals)
            {
                /// Ask what they breath
                Console.WriteLine("What does a " + m.GetType().Name + " Breath?");
                string userInput = Console.ReadLine();

                Substance userSubstance = Substance.Air;

                while (!Enum.TryParse<Substance>(userInput, true, out userSubstance))
                {
                    Console.WriteLine("That's just silly... try again...");
                    userInput = Console.ReadLine();
                }                

               // m.Breathes = userSubstance;
                m.Breath(userSubstance);
            }

            /// If the user gives a bad response, then ask again
            /// Save the user input to the animal 
            /// Make the animal breath.

            




        }
    }
}
